#!/bin/bash
"/usr/bin/gcc" -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=dfontStrings -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large -g -o /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT/./font.obj -I/home/zhdai/uefi/edk2/Uefi/font/Font -I/home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG -I/home/zhdai/uefi/edk2/MdePkg -I/home/zhdai/uefi/edk2/MdePkg/Include -I/home/zhdai/uefi/edk2/MdePkg/Include/X64 -I/home/zhdai/uefi/edk2/MdeModulePkg -I/home/zhdai/uefi/edk2/MdeModulePkg/Include /home/zhdai/uefi/edk2/Uefi/font/Font/font.c
"/usr/bin/gcc" -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=dfontStrings -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large -g -o /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT/./main.obj -I/home/zhdai/uefi/edk2/Uefi/font/Font -I/home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG -I/home/zhdai/uefi/edk2/MdePkg -I/home/zhdai/uefi/edk2/MdePkg/Include -I/home/zhdai/uefi/edk2/MdePkg/Include/X64 -I/home/zhdai/uefi/edk2/MdeModulePkg -I/home/zhdai/uefi/edk2/MdeModulePkg/Include /home/zhdai/uefi/edk2/Uefi/font/Font/main.c
"/usr/bin/ar" -cr /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT/dfont.lib  @/home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT/object_files.lst
"/usr/bin/ld" -o /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.dll -nostdlib -n -q --gc-sections --script=/home/zhdai/uefi/edk2/BaseTools/Scripts/gcc4.4-ld-script --entry _ModuleEntryPoint -u _ModuleEntryPoint -Map /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.map -melf_x86_64 --oformat=elf64-x86-64 -\(  @/home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT/static_library_files.lst -\)
"/usr/bin/objcopy"  /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.dll
/usr/bin/objcopy --only-keep-debug /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.dll /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.debug
/usr/bin/objcopy --strip-unneeded /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.dll
/usr/bin/objcopy --add-gnu-debuglink=/home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.debug /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.dll
#cp -f /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.debug /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64
"/home/zhdai/uefi/edk2/BaseTools/BinWrappers/PosixLike/GenFw" -e UEFI_APPLICATION -o /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.efi /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.dll
cp -f /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.efi /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT
#cp -f /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/dfont.efi /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64
#cp -f /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/DEBUG/*.map /home/zhdai/uefi/edk2/Build/MdeModule/DEBUG_GCC44/X64/Uefi/font/Font/font/OUTPUT

cp -f /home/zhdai/uefi/edk2/Build/MdeModule/RELEASE_GCC44/X64/Uefi/font/font/DEBUG/font.efi  "/home/zhdai/uefi/edk2/Uefi/font/Font/font/$1"
tar -C /home/zhdai/uefi/edk2/Uefi/font/font -zcf "/home/zhdai/www/pubfile/dfont/$1.tgz" "$1"
